package com.ruima.study.jdk21.jdk13.demo1;

/**
 * <p>
 * <p>jdk11 String新特性</p>
 * <p>
 * <p>Copyright (c) 2024/11/11 20:38, 科大讯飞 All Rights Reserve</p>
 *
 * @author ruima6
 * @version [V1.0]
 */
public class StringPlus {
    public static void main(String[] args) {
        String c = "  a b d  ";

        System.out.println(c.strip() + "1");
        System.out.println(c.trim()+ "1");

        // 去除前面的空格和去除后面的空格
        System.out.println(c.stripLeading() + "1");
        System.out.println(c.stripTrailing() + "1");

        String str = " ";
        System.out.println(str.isBlank());


        String str2 = "monkey";
        System.out.println(str2.repeat(2));

    }
}
